<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>index</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="js/jquery.js"></script>
  </head>
  
  <body>
  		EmailAddress:<input type="text" name="email" id="email"/>　　　
  		<button id="send">验证邮箱</button>
  		<br/>
  		回执码:<input type="text" name="return_num" id="returnNum"/>
  		<button id="check">点击测试</button>
  
  <SCRIPT type="text/javascript">

	$("#send").click(function(){
		$.ajax({
			type: "GET",
	        url: "createAuthCode.action",
	        data:{emailAddr:$("#email").val()},
	        success:function(){
				alert("验证邮件已发送,请及时查收并验证");
			}
		});
	});
	
	$("#check").click(function(){
		$.ajax({
			type: "GET",
	        url: "checkCode.action",
	        data:{returnNum:$("#returnNum").val()},
			success:function(data){
				if(data == 1){
					alert("66666");
				}else{
					alert("sb");
				}
			}
		});
	});
  </SCRIPT>
  
  </body>
  
  
</html>
